package com.qf.service.impl;

import com.qf.dao.StudentDao;
import com.qf.dao.impl.StudentDaoImplA;
import com.qf.dao.impl.StudentDaoImplB;
import com.qf.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 2019/11/11
 * Administrator
 * spring1111
 * 面向对象面向君  不负代码不负卿
 */
//@Component("stuservice")
@Service("stuservice")
public class StudentServiceImpl implements StudentService {

   // @Autowired
   // @Qualifier("daob")
    @Resource(name = "studentDaoImplA")
    private StudentDao studentDao;
/*
    public void setStudentDao(StudentDao studentDao) {
        System.out.println("setdao");
        this.studentDao = studentDao;
    }

    public StudentServiceImpl(StudentDao studentDao) {
        System.out.println("studentservice(studentdao)");
        this.studentDao = studentDao;
    }*/

    public void insert() {
        System.out.println("studentservice--被调用");
        studentDao.insert();
    }
}
